package com.wwlwxg.redis;

import redis.clients.jedis.Jedis;

/**
 * 发布到频道
 */
public class PubSubPublish {

	static Jedis jedis = new Jedis("localhost", 6379);

	public static void main(String[] args) throws Exception {
		try {
			String channel = "MyChannel";
			String message = "Hello there!";
			jedis.publish(channel, message);
		} finally {
			jedis.close();
		}
	}
}